<template>
<div :style="{background: color}" class='box'>
  <button :style="{background: color}" class='btn' @click='btn'>
    开始测试
  </button>
</div>
</template>

<script>
export default {
  data() {
    return {
      color: this.$route.query.color,
      title: this.$route.query.title
    }
  },
  methods: {
    btn() {
      this.$router.push({
        path: '/healthSurvey/survey',
        query: {
          color: this.color,
          title: this.title
        }
      });
    }
  }
}
</script>

<style lang="scss" scoped>
.box {
  width: 100%;
  height: 100%;
  position: relative;
}

.btn {
  position: absolute;
  left: 50%;
  margin-left: -25%;
  color: #333;
  width: 50%;
  height: 50px;
  line-height: 50px;
  top: 50%;
  margin-top: -25%;
  outline: 0;
  border: 1px solid #eee;
  border-radius: 5px;
  font-weight: 600;
}
</style>
